
window.addEvent ('load', function() {
	if($('ztbacktotop')){
		var winScroller = new Fx.Scroll(window);
		$('ztbacktotop').addEvent('click', function(e) {
			e = new Event(e).stop();
			winScroller.toTop();
		});
	}
});


window.addEvent('load', function(){

	var StyleCookie = new Hash.Cookie('ZTLago25StyleCookieSite');
	var settings = { colors: '' };
	var style_1, style_2, style_3, style_4;

	/* Style 1 */
	if($('ztcolor1')){$('ztcolor1').addEvent('click', function(e) {
		e = new Event(e).stop();
		if (style_1) style_1.empty();
		new Asset.css(ztpathcolor + 'green.css', {id: 'green'});
		style_1 = $('green');
		settings['colors'] = ztpathcolor + 'green.css';
		StyleCookie.empty();
		StyleCookie.extend(settings);
	});}

	/* Style 2 */
	if($('ztcolor2')){$('ztcolor2').addEvent('click', function(e) {
		e = new Event(e).stop();
		if (style_2) style_2.empty();
		new Asset.css(ztpathcolor + 'blue.css', {id: 'blue'});
		style_2 = $('blue');
		settings['colors'] = ztpathcolor + 'blue.css';
		StyleCookie.empty();
		StyleCookie.extend(settings);
	});}

	/* Style 3 */
	if($('ztcolor3')){$('ztcolor3').addEvent('click', function(e) {
		e = new Event(e).stop();
		if (style_3) style_3.empty();
		new Asset.css(ztpathcolor + 'orange.css', {id: 'orange'});
		style_3 = $('orange');
		settings['colors'] = ztpathcolor + 'orange.css';
		StyleCookie.empty();
		StyleCookie.extend(settings);
	});}
	
	/* Style 4 */
	if($('ztcolor4')){$('ztcolor4').addEvent('click', function(e) {
		e = new Event(e).stop();
		if (style_4) style_4.empty();
		new Asset.css(ztpathcolor + 'purple.css', {id: 'purple'});
		style_4 = $('purple');
		settings['colors'] = ztpathcolor + 'purple.css';
		StyleCookie.empty();
		StyleCookie.extend(settings);
	});}

});
